<?php
/*
 * Copyright (c) 2017-2025 Tencent. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
namespace TencentCloud\Sqlserver\V20180328\Models;
use TencentCloud\Common\AbstractModel;

/**
 * DescribeReadOnlyGroupDetails response structure.
 *
 * @method string getReadOnlyGroupId() Obtain Read-only group ID.
 * @method void setReadOnlyGroupId(string $ReadOnlyGroupId) Set Read-only group ID.
 * @method string getReadOnlyGroupName() Obtain Read-only group name.
 * @method void setReadOnlyGroupName(string $ReadOnlyGroupName) Set Read-only group name.
 * @method string getRegionId() Obtain Region ID of the read-only group, which is the same as that of the primary instance.
 * @method void setRegionId(string $RegionId) Set Region ID of the read-only group, which is the same as that of the primary instance.
 * @method string getZoneId() Obtain AZ ID of the read-only group, which is the same as that of the primary instance.
 * @method void setZoneId(string $ZoneId) Set AZ ID of the read-only group, which is the same as that of the primary instance.
 * @method integer getIsOfflineDelay() Obtain Whether to enable startup timeout elimination, 0 - disable removal, 1 - enable removal.
 * @method void setIsOfflineDelay(integer $IsOfflineDelay) Set Whether to enable startup timeout elimination, 0 - disable removal, 1 - enable removal.
 * @method integer getReadOnlyMaxDelayTime() Obtain Timeout threshold used after the delayed read-only instance removal feature is enabled.
 * @method void setReadOnlyMaxDelayTime(integer $ReadOnlyMaxDelayTime) Set Timeout threshold used after the delayed read-only instance removal feature is enabled.
 * @method integer getMinReadOnlyInGroup() Obtain Minimum number of retained read-only replicas in the read-only group, after the delayed read-only instance removal feature is enabled.
 * @method void setMinReadOnlyInGroup(integer $MinReadOnlyInGroup) Set Minimum number of retained read-only replicas in the read-only group, after the delayed read-only instance removal feature is enabled.
 * @method string getVip() Obtain Read-only group VIP.
 * @method void setVip(string $Vip) Set Read-only group VIP.
 * @method integer getVport() Obtain Read-only group VPort.
 * @method void setVport(integer $Vport) Set Read-only group VPort.
 * @method string getVpcId() Obtain VPC ID of the read-only group.
 * @method void setVpcId(string $VpcId) Set VPC ID of the read-only group.
 * @method string getSubnetId() Obtain VPC subnet ID of the read-only group.
 * @method void setSubnetId(string $SubnetId) Set VPC subnet ID of the read-only group.
 * @method array getReadOnlyInstanceSet() Obtain Read-only instance replica collection.
 * @method void setReadOnlyInstanceSet(array $ReadOnlyInstanceSet) Set Read-only instance replica collection.
 * @method integer getStatus() Obtain Read-only group status: 1 - running after successful application; 5 - applying.
 * @method void setStatus(integer $Status) Set Read-only group status: 1 - running after successful application; 5 - applying.
 * @method string getMasterInstanceId() Obtain Primary instance ID. For example, mssql-sgeshe3th.
 * @method void setMasterInstanceId(string $MasterInstanceId) Set Primary instance ID. For example, mssql-sgeshe3th.
 * @method string getRequestId() Obtain The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 * @method void setRequestId(string $RequestId) Set The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 */
class DescribeReadOnlyGroupDetailsResponse extends AbstractModel
{
    /**
     * @var string Read-only group ID.
     */
    public $ReadOnlyGroupId;

    /**
     * @var string Read-only group name.
     */
    public $ReadOnlyGroupName;

    /**
     * @var string Region ID of the read-only group, which is the same as that of the primary instance.
     */
    public $RegionId;

    /**
     * @var string AZ ID of the read-only group, which is the same as that of the primary instance.
     */
    public $ZoneId;

    /**
     * @var integer Whether to enable startup timeout elimination, 0 - disable removal, 1 - enable removal.
     */
    public $IsOfflineDelay;

    /**
     * @var integer Timeout threshold used after the delayed read-only instance removal feature is enabled.
     */
    public $ReadOnlyMaxDelayTime;

    /**
     * @var integer Minimum number of retained read-only replicas in the read-only group, after the delayed read-only instance removal feature is enabled.
     */
    public $MinReadOnlyInGroup;

    /**
     * @var string Read-only group VIP.
     */
    public $Vip;

    /**
     * @var integer Read-only group VPort.
     */
    public $Vport;

    /**
     * @var string VPC ID of the read-only group.
     */
    public $VpcId;

    /**
     * @var string VPC subnet ID of the read-only group.
     */
    public $SubnetId;

    /**
     * @var array Read-only instance replica collection.
     */
    public $ReadOnlyInstanceSet;

    /**
     * @var integer Read-only group status: 1 - running after successful application; 5 - applying.
     */
    public $Status;

    /**
     * @var string Primary instance ID. For example, mssql-sgeshe3th.
     */
    public $MasterInstanceId;

    /**
     * @var string The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    public $RequestId;

    /**
     * @param string $ReadOnlyGroupId Read-only group ID.
     * @param string $ReadOnlyGroupName Read-only group name.
     * @param string $RegionId Region ID of the read-only group, which is the same as that of the primary instance.
     * @param string $ZoneId AZ ID of the read-only group, which is the same as that of the primary instance.
     * @param integer $IsOfflineDelay Whether to enable startup timeout elimination, 0 - disable removal, 1 - enable removal.
     * @param integer $ReadOnlyMaxDelayTime Timeout threshold used after the delayed read-only instance removal feature is enabled.
     * @param integer $MinReadOnlyInGroup Minimum number of retained read-only replicas in the read-only group, after the delayed read-only instance removal feature is enabled.
     * @param string $Vip Read-only group VIP.
     * @param integer $Vport Read-only group VPort.
     * @param string $VpcId VPC ID of the read-only group.
     * @param string $SubnetId VPC subnet ID of the read-only group.
     * @param array $ReadOnlyInstanceSet Read-only instance replica collection.
     * @param integer $Status Read-only group status: 1 - running after successful application; 5 - applying.
     * @param string $MasterInstanceId Primary instance ID. For example, mssql-sgeshe3th.
     * @param string $RequestId The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    function __construct()
    {

    }

    /**
     * For internal only. DO NOT USE IT.
     */
    public function deserialize($param)
    {
        if ($param === null) {
            return;
        }
        if (array_key_exists("ReadOnlyGroupId",$param) and $param["ReadOnlyGroupId"] !== null) {
            $this->ReadOnlyGroupId = $param["ReadOnlyGroupId"];
        }

        if (array_key_exists("ReadOnlyGroupName",$param) and $param["ReadOnlyGroupName"] !== null) {
            $this->ReadOnlyGroupName = $param["ReadOnlyGroupName"];
        }

        if (array_key_exists("RegionId",$param) and $param["RegionId"] !== null) {
            $this->RegionId = $param["RegionId"];
        }

        if (array_key_exists("ZoneId",$param) and $param["ZoneId"] !== null) {
            $this->ZoneId = $param["ZoneId"];
        }

        if (array_key_exists("IsOfflineDelay",$param) and $param["IsOfflineDelay"] !== null) {
            $this->IsOfflineDelay = $param["IsOfflineDelay"];
        }

        if (array_key_exists("ReadOnlyMaxDelayTime",$param) and $param["ReadOnlyMaxDelayTime"] !== null) {
            $this->ReadOnlyMaxDelayTime = $param["ReadOnlyMaxDelayTime"];
        }

        if (array_key_exists("MinReadOnlyInGroup",$param) and $param["MinReadOnlyInGroup"] !== null) {
            $this->MinReadOnlyInGroup = $param["MinReadOnlyInGroup"];
        }

        if (array_key_exists("Vip",$param) and $param["Vip"] !== null) {
            $this->Vip = $param["Vip"];
        }

        if (array_key_exists("Vport",$param) and $param["Vport"] !== null) {
            $this->Vport = $param["Vport"];
        }

        if (array_key_exists("VpcId",$param) and $param["VpcId"] !== null) {
            $this->VpcId = $param["VpcId"];
        }

        if (array_key_exists("SubnetId",$param) and $param["SubnetId"] !== null) {
            $this->SubnetId = $param["SubnetId"];
        }

        if (array_key_exists("ReadOnlyInstanceSet",$param) and $param["ReadOnlyInstanceSet"] !== null) {
            $this->ReadOnlyInstanceSet = [];
            foreach ($param["ReadOnlyInstanceSet"] as $key => $value){
                $obj = new ReadOnlyInstance();
                $obj->deserialize($value);
                array_push($this->ReadOnlyInstanceSet, $obj);
            }
        }

        if (array_key_exists("Status",$param) and $param["Status"] !== null) {
            $this->Status = $param["Status"];
        }

        if (array_key_exists("MasterInstanceId",$param) and $param["MasterInstanceId"] !== null) {
            $this->MasterInstanceId = $param["MasterInstanceId"];
        }

        if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
            $this->RequestId = $param["RequestId"];
        }
    }
}
